local t = Def.ActorFrame {};
t[#t+1] = Def.ActorFrame {
	LoadFont("Common Normal") .. {
		InitCommand=cmd(y,0;maxwidth,160;rotationz,45;uppercase,true;strokecolor,color("#000000"););
		SetMessageCommand=function(self, params)
		local mode = params.Label;
		local so = GAMESTATE:GetSortOrder();
			if so == "SortOrder_ModeMenu" then
				self:settext(mode);
				self:diffuse(color("#FFFFFF"));
			else
			self:settext("");
			end;
		end;
	};	

	LoadActor(THEME:GetPathG("_mode", "overlay")) .. {
		InitCommand=cmd(zoom,0.55);
	};
};

t[#t+1] = Def.ActorFrame { -- much ado about sorting
	Def.Sprite {
		Name="CourseModes";
		Condition=GAMESTATE:IsCourseMode();
		SetCommand=function(self,params)
		local mode = params.Label;
		local so = GAMESTATE:GetSortOrder();
			if so == "SortOrder_ModeMenu" then
				if mode == "All Courses" then
					self:Load(THEME:GetPathG("_modes/mode special","All Courses"))
				elseif mode == "Survival" then
					self:Load(THEME:GetPathG("_modes/mode special","Survival"))
				else
					self:Load(THEME:GetPathG("_modes/mode",mode))
				end
				self:zoom(0.3125)
			end
		end;
	}
};

return t;
